//
//  WFXiaLaTableViewCell.m
//  WangyiFangzuo
//
//  Created by 瑜 on 16/9/13.
//  Copyright © 2016年 111. All rights reserved.
//

#import "WFXiaLaTableViewCell.h"
#import "WFXiaLaCollectionViewCell.h"
@implementation WFXiaLaTableViewCell
static NSString *ID = @"cell";

- (void)awakeFromNib {
    self.collectionView.delegate = self;
    self.collectionView.dataSource = self;
    [self.collectionView registerNib:[UINib nibWithNibName:@"WFXiaLaCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:ID];
    self.collectionView.showsVerticalScrollIndicator = NO;
    
}


- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
    return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 20;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    WFXiaLaCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
    cell.backgroundColor= [UIColor redColor];
    
    return cell;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"%ld",(long)indexPath.row);
}
+(instancetype)cellWithArray:(NSArray *)arr
{
    return [[[NSBundle mainBundle] loadNibNamed:@"WFXiaLaTableViewCell" owner:nil options:nil] lastObject];
}

@end
